﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Input;

namespace Xngine.Input
{
    using Microsoft.Xna.Framework;

    /// <summary>
    /// Input Manager Class.
    /// Responsible for input management
    /// </summary>
    public static partial class InputManager
    {
        /// <summary>
        /// Stores the status of pad availability.
        /// </summary>
        private static readonly Dictionary<PlayerIndex, bool> PadAvailability = new Dictionary<PlayerIndex, bool>(4);

        /// <summary>
        /// Refreshes the pad availability table.
        /// </summary>
        private static void RefreshAvailablePads()
        {
            for (int i = 0; i < 4; i++)
            {
                PlayerIndex index = (PlayerIndex)i;
                PadAvailability[index] = GamePad.GetState(index).IsConnected;
            }
        }
    }
}
